<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" url="https://fastly.jsdelivr.net/gh/ZEC-dev/CDN@main/css/prism.css">
    <link rel="script" url="https://fastly.jsdelivr.net/gh/ZEC-dev/CDN@main/css/prism.js">
    <link rel="stylesheet" url="https://fastly.jsdelivr.net/gh/ZEC-dev/CDN@main/css/CSS.css">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>可伸缩侧边栏布局</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
</head>
<body>
    <div class="container">
        <!-- 侧边栏 -->
        <aside class="sidebar">
            <div class="sidebar-header">
                <div class="logo">
                    <span class="logo-text">ZEC</span>
                </div>
                <button class="toggle-btn">
                    <i class="fas fa-chevron-left"></i>
                </button>
            </div>
            
            <div class="sidebar-menu">
                <div class="menu-item">
                    <i class="fas fa-home"></i>
                    <span class="menu-text">首页</span>
                </div>
                <div class="menu-item">
                    <i class="fas fa-chart-bar"></i>
                    <span class="menu-text">分析</span>
                </div>
                <div class="menu-item">
                    <i class="fas fa-users"></i>
                    <span class="menu-text">用户</span>
                </div>
                <div class="menu-item">
                    <i class="fas fa-cog"></i>
                    <span class="menu-text">设置</span>
                </div>
                <div class="menu-item">
                    <i class="fas fa-question-circle"></i>
                    <span class="menu-text">帮助</span>
                </div>
            </div>
            
            <div class="sidebar-card">
                <h3>提示</h3>
                <p>点击左上角按钮可收缩/展开侧边栏。</p>
            </div>
        </aside>
        
        <!-- 主内容区 -->
        <main class="main-content">
            <div class="page-header">
                <h1 class="page-title">仪表板概览</h1>
                <p class="page-description">查看您的数据统计和重要信息</p>
            </div>
            
            <div class="cards-container">
                <div class="card">
                    <div class="card-header">
                        <i class="fas fa-chart-line"></i> 销售统计
                    </div>
                    <div class="card-body">
                        <p>本月销售额: <strong>$12,450</strong></p>
                        <p>同比增长: <strong style="color: green;">+15%</strong></p>
                        <p>活跃用户: <strong>2,847</strong></p>
                    </div>
                    <div class="card-footer">
                        <button class="btn">查看详情</button>
                    </div>
                </div>
                
                <div class="card">
                    <div class="card-header">
                        <i class="fas fa-users"></i> 用户分析
                    </div>
                    <div class="card-body">
                        <p>新注册用户: <strong>324</strong></p>
                        <p>用户留存率: <strong>78%</strong></p>
                        <p>平均会话时长: <strong>4.2分钟</strong></p>
                    </div>
                    <div class="card-footer">
                        <button class="btn">查看详情</button>
                    </div>
                </div>
                
                <div class="card">
                    <div class="card-header">
                        <i class="fas fa-shopping-cart"></i> 订单信息
                    </div>
                    <div class="card-body">
                        <p>待处理订单: <strong>42</strong></p>
                        <p>已完成订单: <strong>1,284</strong></p>
                        <p>平均订单价值: <strong>$67.50</strong></p>
                    </div>
                    <div class="card-footer">
                        <button class="btn">查看详情</button>
                    </div>
                </div>
                
                <div class="card">
                    <div class="card-header">
                        <i class="fas fa-bell"></i> 通知中心
                    </div>
                    <div class="card-body">
                        <p>系统更新: 计划于今晚进行</p>
                        <p>新功能: 数据分析工具已上线</p>
                        <p>提醒: 季度报告即将到期</p>
                    </div>
                    <div class="card-footer">
                        <button class="btn">查看全部</button>
                    </div>
                </div>
            </div>
            
            <div class="card">
                <div class="card-header">
                    <i class="fas fa-tasks"></i> 最近活动
                </div>
                <div class="card-body">
                    <p>用户 "张三" 完成了订单 #2847</p>
                    <p>新用户 "李四" 注册了账户</p>
                    <p>产品 "高级套餐" 库存不足</p>
                    <p>系统备份于 14:30 完成</p>
                </div>
                <div class="card-footer">
                    <button class="btn">加载更多</button>
                </div>
            </div>
        </main>
    </div>

    <script>
        document.addEventListener('DOMContentLoaded', function() {
            const toggleBtn = document.querySelector('.toggle-btn');
            const sidebar = document.querySelector('.sidebar');
            
            toggleBtn.addEventListener('click', function() {
                sidebar.classList.toggle('collapsed');
            });
        });
    </script>
</body>
</html>